#ifndef SIGNLOGIN_H
#define SIGNLOGIN_H

#include <QWidget>

#include "myclientsocket.h"
#include "client.h"

#include "stdshared.h"
namespace Ui {
class SignLogin;
}

class SignLogin : public QWidget
{
    Q_OBJECT

public:
    explicit SignLogin(QWidget *parent = nullptr);
    ~SignLogin();

    void mousePressEvent(QMouseEvent *event) override;

    void mouseMoveEvent(QMouseEvent *event) override;

    void mouseReleaseEvent(QMouseEvent *event) override;

public slots:
    void handleLogin();
    void handleRegiter();
    void handleDataRecv(const QByteArray& data);

private slots:
    void on_closeBtn_clicked();

private:
    Ui::SignLogin *ui;

    Client * m_client;

    MyClientSocket * m_socket;

    QString m_account;

    bool m_dragging = false;
    QPoint m_dragPosition;
};

#endif // SIGNLOGIN_H
